package cn.javaxc.mvcwork.framework.actions;
import java.util.*;
import java.io.Serializable;
import org.springframework.stereotype.Component;

public class MVCResults {
	private static MVCResults m_obj;
	public static MVCResults getDefault(){
		return m_obj;
	}
	////////////////////////////////////////
	public MVCResults(){
		cfg=new HashMap();
		cfg.put("defaults",new HashMap());
		Map actions=new HashMap();
		actions.put("scopeKey","elementsmap");
		Map results=new HashMap();
		results.put("UploadFile","/talent/page/selfile");
		actions.put("results",results);
		cfg.put("/ProcessFile",actions);
		actions=new HashMap();
		actions.put("scopeKey","elementsmap");
		results=new HashMap();
		results.put("IncludePage","/includepage");
		results.put("ContainerOK","/includepage");
		results.put("ContainerOK.layout","style");
		results.put("SubmitOK","/VUEAction/.do");
		results.put("UploadFileOK","/VUEAction/.do");
		results.put("HtmlListOK","/talent/page/htmllist");
		results.put("AjaxListOK","/talent/page/ajaxlist");
		results.put("AjaxCompleteOK","/talent/page/ajaxcomplete");
		results.put("flow","/talent/page/flow");
		results.put("layout","/talent/page/layout");
		results.put("layout.layout","nav");
		results.put("gantt","/includepage");
		results.put("gantt.layout","gantt");
		results.put("login","/Login/Index.do");
		actions.put("results",results);
		cfg.put("/VUEAction",actions);
		actions=new HashMap();
		actions.put("scopeKey","LoginBean");
		results=new HashMap();
		results.put("SubmitOK","/VUEAction/.do");
		results.put("login","/talent/frame/index");
		results.put("LoginOK","/VUELogin/Frame.do");
		results.put("LoginOK.redirect","true");
		results.put("RedirectURL","/redirect");
		actions.put("results",results);
		cfg.put("/VUELogin",actions);
		actions=new HashMap();
		results=new HashMap();
		results.put("ProcessOK","/admin/system_process_ok");
		results.put("ViewCronOK","/service/cron_view");
		actions.put("results",results);
		cfg.put("/ProcessSystem",actions);
		actions=new HashMap();
		actions.put("scopeKey","LoginBean");
		results=new HashMap();
		results.put("SubmitOK","/VUEAction/.do");
		results.put("login","/talent/frame/index");
		results.put("RedirectURL","/redirect");
		actions.put("results",results);
		cfg.put("/JWTLogin",actions);
		actions=new HashMap();
		actions.put("/common/login","login");
		actions.put("/common.login","user");
		actions.put("/common","nav");
		actions.put("/xcerp","nav");
		actions.put("/xcerp.login","jwt");
		cfg.put("templates",actions);
		m_obj=this;

	}
   private Map cfg=null;
   public Map getConfig(){
	 return cfg;
   }
   public void setConfig(Map cfg){
	this.cfg=cfg;
   }
	public Map subset(String prefix){
		return (Map)cfg.get(prefix);
	}
  public String toString(){
	return cfg.toString();
  }
};
